.account_buttons
  - if not logged_in?
    = link_to_button "Login", "/login"
    = link_to_button "Create User", "/signup"
    %br/
  - else
    = link_to_button "My Account", "/me"
    = link_to_button "Logout", "/logout"

.menu_buttons
  = link_to_button "Index", :root
  / TODO: Fugly, направи си Helper, който да спестява от този код
  / Егати, колко зле стана.
  = link_to_button "Status", {:controller => :spoj1 , :action => :status}
  = link_to_button "Submit", {:controller => :runs, :action => :new}
  = link_to_button "Contests", {:controller => :contests}
  - if session[:user]
    = link_to_button "Logout", "/logout"
    = link_to_button "Get my submits", {:controller => :runs, :user_id => current_user}
    = link_to_button "My profile", {:controller => :user, :action => :show}
  = yield :menu


.admin_buttons
  - if admin? current_user
    = link_to_button "Admin Page", :controller => :spoj1_admin, :action => :index
    = link_to_button "Add contest", :controller => :contests, :action => :new
    = link_to_button "Add problem", :controller => :problems, :action => :new
    = link_to_button "Edit problem", :controller => :spoj1_admin, :action => :select_problem_to_edit 
    = link_to_button "Edit contest", :controller => :spoj1_admin, :action => :select_contest_to_edit
    = link_to_button "Rejudge all runs", :controller => :spoj1_admin, :action => :rejudge_all_runs
    
    %br/

/
  TODO:
  Тази функционалност за момента липсва или не е направена както трябва.
  Оправи нещата
  = link_to_button "Add admin", :controller=>:admin, :action => :add_admin
  = link_to_button "Edit an existing problem", :action => :select_problem_to_edit
  = link_to_button "Edit an existing contest", :action => :select_contest_to_edit


